<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>年度听歌报告</title>
  <link rel="shortcut icon" href="//s1.music.126.net/style/favicon.ico">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.0.2/css/swiper.min.css">
  <link rel="stylesheet" href="./index.css">
</head>

<body>
  <audio id="j-bgm" src="./bgm.mp3"></audio>
  <div class="music-btn off"></div>
  <div class="next-view-c"></div>
  <div class="swiper-container">
    <div class="swiper-wrapper">
      <div class="swiper-slide">
        <div class="view index">
          <div class="logo-c"></div>
        </div>
      </div>
      <div class="swiper-slide">
        <div class="view special">
          <div class="sun"></div>
          <!-- 荡秋千 -->
          <div class="art">
            <div class="swing j-anim03 z-anim">
              <!-- 腿 -->
              <div class="leg2">
                <div class="jiojio"></div>
              </div>
              <!-- 腿 -->
              <div class="leg1">
                <div class="jiojio"></div>
              </div>
              <!-- 脖子 -->
              <div class="neck"></div>
              <!-- 头 -->
              <div class="head">
                <div class="part"></div>
              </div>
            </div>
          </div>
          <!-- 特殊内容 -->
          <div class="paras">
            <p class="para f-animLineUp" style="transition-delay: 0.2s;">
              <em class="s-fcRed">11月1日</em>
            </p>
            <p class="para f-animLineUp" style="transition-delay: 0.3s;">
              大概是很特别的一天
            </p>
            <p class="para f-animLineUp" style="transition-delay: 0.4s;">
              这一天里
            </p>
            <p class="para f-animLineUp" style="transition-delay: 0.5s;">
              TA把Richard Clayderma...的
              <em class="s-fcRed">《梦中的婚礼》</em>
            </p>
            <p class="para f-animLineUp" style="transition-delay: 0.6s;">
              反复听了
              <em class="s-fcRed">10次</em>
            </p>
          </div>
        </div>
      </div>
      <div class="swiper-slide">
        <div class="view favourite">
          <div class="id18_juian z-juanAni2">

          </div>
        </div>
      </div>
      <div class="swiper-slide">
        <div class="view favourite-songs">
          <div class="manwrap">
            <div class="shoubi"></div>
            <div class="man"></div>
            <div class="tou"></div>
          </div>
        </div>
      </div>
      <div class="swiper-slide">
        <div class="view">
          <div class="cat">
            <div class="bg"></div>
          <div class="maoyan maoyan1"></div>
          <div class="maoyan maoyan2"></div>
          <div class="maozui"></div>
          <div class="maozhua"></div>
          <div class="maowei"></div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.0.2/js/swiper.min.js"></script>
  <script>
    const viewSpecial = document.querySelector('.view .paras');
    const musicBtn = document.querySelector('.music-btn');
    let defaultMusicPlay = true;
    const bgMusic = document.querySelector('#j-bgm');
    const id18Juian = document.querySelector('.z-juanAni2');
    setInterval(() => {
      id18Juian.classList.remove('z-juanAni2');
      setTimeout(() => {
        id18Juian.classList.add('z-juanAni2');
      }, 100);
    }, 3000)
    musicBtn.addEventListener('click', () => {
      if (defaultMusicPlay) {
        bgMusic.play();
      } else {
        bgMusic.pause();
      }
      defaultMusicPlay = !defaultMusicPlay;
      musicBtn.classList.toggle('off');
    });

    var mySwiper = new Swiper('.swiper-container', {
      direction: 'vertical', // 垂直切换选项
      on: {
        slideChangeTransitionEnd: function () {
          if (this.activeIndex === 1) {
            viewSpecial.classList.add('z-enter')
          } else {
            viewSpecial.classList.remove('z-enter')
          }
        },
      },
    })        
  </script>
</body>

</html>